[19.0][MIG] Migrate DMS modules to 19.0#474
Open
HaithamSaqr wants to merge 8 commits into
Open
Conversation
- Update version to 19.0.1.0.0 - res.groups.users → user_ids (renamed in Odoo 19) - res.users.groups_id → group_ids (renamed in Odoo 19) - ir.actions.server.groups_id → group_ids - res.groups.category_id → privilege_id (new res.groups.privilege model) - Remove deprecated <group expand="0" string="Group By"> attributes - Remove unsupported target="inline" on ir.actions.act_window - Fix XPath in OWL templates (//div → .) for empty KanbanView/ListView Buttons - store.Attachment → store["ir.attachment"] in JS Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Update version to 19.0.1.0.0 - Replace deprecated _where_calc/_apply_ir_rules SQL with ORM search() API - Add defensive null checks in dms_list_controller processProps() Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Update version to 19.0.1.0.0 - ir.actions.act_window.groups_id → group_ids (renamed in Odoo 19) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Update version to 19.0.1.0.0 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Update version to 19.0.1.0.0 - res.users.groups_id → group_ids in test - Remove res.groups.category_id (field removed in Odoo 19) - hr.employee.base removed in Odoo 19: move dms.field.mixin inheritance to hr.employee and hr.employee.public directly - View XPath: <field name="user_id"> → <field name="name"> on hr.employee.public form (user_id no longer in form view in 19) - Block name: employee_rights_setting_container → employees_setting_container in hr res.config.settings (renamed in Odoo 19) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Update version to 19.0.1.0.0 - Replace web_editor dependency with html_editor (web_editor removed in 19) - Update JS import: @web_editor/components/media_dialog/search_media → @html_editor/main/media/media_dialog/search_media Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Update version to 19.0.1.0.0 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Hello @HaithamSaqr, normally the PRs are for a single module, that way is way easier to review the code (it is also OCA common practice 😅). I would recommend you to take a look at the guidelines over here https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst |
dnplkndll
added a commit
to ledoent/dms
that referenced
this pull request
May 12, 2026
- Bump manifest version to 19.0.1.0.0.
- Adopt 19.0 group privilege model: replace res.groups.category_id with
privilege_id and the new res.groups.privilege record.
- Simplify to a 2-tier security structure (user / manager); group_dms_user
now implies base.group_user directly. Removed group_dms_viewer.
- res.users.groups_id → group_ids (demo XML + tests).
- res.groups.users → user_ids in access_groups._compute_users dependency.
- auto_join=True/False → bypass_search_access=True/False on 10 fields
across access_groups, directory, dms_file, storage.
- _sql_constraints → models.Constraint in dms_category, access_groups, tag.
- odoo.osv.expression → odoo.fields.Domain (all imports + AND/OR/Domain.TRUE
/FALSE/NEGATIVE_OPERATORS aliases at module top).
- read_group → _read_group with the new aggregate-tuple return format in
dms_security_mixin._get_domain_by_inheritance.
- @http.route(type='json') → type='jsonrpc' on the onboarding controller.
- Translation modernisation per pylint_odoo 19.0 (W8161 prefer-env-translation
+ W8301 translation-not-lazy): replace 'from odoo import _' with
self.env._() and lazy positional/keyword formatting throughout controllers
and models.
- DMS access filter restoration: override _search() on dms.security.mixin
to AND the access-group + inheritance domain into all non-su searches.
19.0 changed ir.rule._compute_domain() to use Domain.optimize (basic
level) instead of optimize_full, which means 'search=' methods on
computed-Boolean fields like permission_read are silently bypassed when
rule domain_force is evaluated. Without this override the
[('permission_read', '=', user.id)] global rules no-op and every user
sees every record.
- _search_starred now handles both '=' and 'in' operators (19.0's basic
optimizer normalises ('starred','=',True) to ('starred','in',{True}),
which the old single-operator branch did not recognise).
- Demo-data test guards: tests referencing dms.file_*_demo /
base.partner_demo_portal now skipTest() when the xmlid isn't found,
since 19.0 defaults to with_demo=False on CI.
- index=True → index='btree' on dms_file.attachment_id.
- _get_ref_selection(): pylint: disable=no-search-all (intentional,
enumerates all registered models for the reference selection).
- View / JS cleanups (adopted from OCA#474 by @HaithamSaqr): removed
deprecated <group expand='0' string='Group By'> attributes; removed
unsupported target='inline' on ir.actions.act_window; fixed OWL XPath
'//div' → '.' in empty KanbanView/ListView Buttons templates; replaced
store.Attachment with store['ir.attachment'] in attachment JS models.
dnplkndll
added a commit
to ledoent/dms
that referenced
this pull request
May 12, 2026
- Bump manifest version to 19.0.1.0.0.
- Adopt 19.0 group privilege model: replace res.groups.category_id with
privilege_id and the new res.groups.privilege record.
- Simplify to a 2-tier security structure (user / manager); group_dms_user
now implies base.group_user directly. Removed group_dms_viewer.
- res.users.groups_id → group_ids (demo XML + tests).
- res.groups.users → user_ids in access_groups._compute_users dependency.
- auto_join=True/False → bypass_search_access=True/False on 10 fields
across access_groups, directory, dms_file, storage.
- _sql_constraints → models.Constraint in dms_category, access_groups, tag.
- odoo.osv.expression → odoo.fields.Domain (all imports + AND/OR/Domain.TRUE
/FALSE/NEGATIVE_OPERATORS aliases at module top).
- read_group → _read_group with the new aggregate-tuple return format in
dms_security_mixin._get_domain_by_inheritance.
- @http.route(type='json') → type='jsonrpc' on the onboarding controller.
- Translation modernisation per pylint_odoo 19.0 (W8161 prefer-env-translation
+ W8301 translation-not-lazy): replace 'from odoo import _' with
self.env._() and lazy positional/keyword formatting throughout controllers
and models.
- DMS access filter restoration: override _search() on dms.security.mixin
to AND the access-group + inheritance domain into all non-su searches.
19.0 changed ir.rule._compute_domain() to use Domain.optimize (basic
level) instead of optimize_full, which means 'search=' methods on
computed-Boolean fields like permission_read are silently bypassed when
rule domain_force is evaluated. Without this override the
[('permission_read', '=', user.id)] global rules no-op and every user
sees every record.
- _search_starred now handles both '=' and 'in' operators (19.0's basic
optimizer normalises ('starred','=',True) to ('starred','in',{True}),
which the old single-operator branch did not recognise).
- Demo-data test guards: tests referencing dms.file_*_demo /
base.partner_demo_portal now skipTest() when the xmlid isn't found,
since 19.0 defaults to with_demo=False on CI.
- index=True → index='btree' on dms_file.attachment_id.
- _get_ref_selection(): pylint: disable=no-search-all (intentional,
enumerates all registered models for the reference selection).
- View / JS cleanups (adopted from OCA#474 by @HaithamSaqr): removed
deprecated <group expand='0' string='Group By'> attributes; removed
unsupported target='inline' on ir.actions.act_window; fixed OWL XPath
'//div' → '.' in empty KanbanView/ListView Buttons templates; replaced
store.Attachment with store['ir.attachment'] in attachment JS models.
dnplkndll
added a commit
to ledoent/dms
that referenced
this pull request
May 12, 2026
- Bump manifest version to 19.0.1.0.0.
- Adopt 19.0 group privilege model: replace res.groups.category_id with
privilege_id and the new res.groups.privilege record.
- Simplify to a 2-tier security structure (user / manager); group_dms_user
now implies base.group_user directly. Removed group_dms_viewer.
- res.users.groups_id → group_ids (demo XML + tests).
- res.groups.users → user_ids in access_groups._compute_users dependency.
- auto_join=True/False → bypass_search_access=True/False on 10 fields
across access_groups, directory, dms_file, storage.
- _sql_constraints → models.Constraint in dms_category, access_groups, tag.
- odoo.osv.expression → odoo.fields.Domain (all imports + AND/OR/Domain.TRUE
/FALSE/NEGATIVE_OPERATORS aliases at module top).
- read_group → _read_group with the new aggregate-tuple return format in
dms_security_mixin._get_domain_by_inheritance.
- @http.route(type='json') → type='jsonrpc' on the onboarding controller.
- Translation modernisation per pylint_odoo 19.0 (W8161 prefer-env-translation
+ W8301 translation-not-lazy): replace 'from odoo import _' with
self.env._() and lazy positional/keyword formatting throughout controllers
and models.
- DMS access filter restoration: override _search() on dms.security.mixin
to AND the access-group + inheritance domain into all non-su searches.
19.0 changed ir.rule._compute_domain() to use Domain.optimize (basic
level) instead of optimize_full, which means 'search=' methods on
computed-Boolean fields like permission_read are silently bypassed when
rule domain_force is evaluated. Without this override the
[('permission_read', '=', user.id)] global rules no-op and every user
sees every record.
- _search_starred now handles both '=' and 'in' operators (19.0's basic
optimizer normalises ('starred','=',True) to ('starred','in',{True}),
which the old single-operator branch did not recognise).
- Demo-data test guards: tests referencing dms.file_*_demo /
base.partner_demo_portal now skipTest() when the xmlid isn't found,
since 19.0 defaults to with_demo=False on CI.
- index=True → index='btree' on dms_file.attachment_id.
- _get_ref_selection(): pylint: disable=no-search-all (intentional,
enumerates all registered models for the reference selection).
- View / JS cleanups (adopted from OCA#474 by @HaithamSaqr): removed
deprecated <group expand='0' string='Group By'> attributes; removed
unsupported target='inline' on ir.actions.act_window; fixed OWL XPath
'//div' → '.' in empty KanbanView/ListView Buttons templates; replaced
store.Attachment with store['ir.attachment'] in attachment JS models.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration of DMS modules from 18.0 to 19.0
This PR migrates the following 7 modules to Odoo 19.0:
dms— Document Management System (core)dms_field— Embedded DMS for any recorddms_auto_classification— Auto classify documentsdms_field_auto_classification— Auto classify embedded fileshr_dms_field— DMS for employeesweb_editor_media_dialog_dms— Use DMS files in HTML editordms_user_role— Link DMS access groups to user rolesMigration Patterns Applied
Field renames in Odoo 19
res.groups.users→res.groups.user_idsres.users.groups_id→res.users.group_idsir.actions.server.groups_id→ir.actions.server.group_idsir.actions.act_window.groups_id→ir.actions.act_window.group_idsNew
res.groups.privilegemodelres.groups.category_idremoved → replaced withres.groups.privilege_idpointing to a new
res.groups.privilegerecord (which keeps thecategory_id → ir.module.categoryrelation).View / RNG schema strict in 19
<group expand="0" string="Group By">attributes fromsearch views (no longer accepted by RNG schema).
target="inline"fromir.actions.act_window.Python ORM changes
_where_calc/_apply_ir_rulesSQL helpers (removed in 19)with the standard ORM
search()API indms_field.JS / OWL changes
mail.store.Attachment→mail.store["ir.attachment"].web_editormodule removed in 19 →web_editor_media_dialog_dmsnowdepends on
html_editor. JS imports updated accordingly.expr="//div"→expr=".") for thenow-empty
web.KanbanView.Buttons/web.ListView.Buttonstemplates.hrmodel changeshr.employee.baseremoved in Odoo 19 → moveddms.field.mixininheritance to
hr.employeeandhr.employee.publicdirectly.<field name="user_id">→<field name="name">onhr.employee.publicform (user_idno longer present in the form view).employee_rights_setting_container→employees_setting_containerinhr.res_config_settings_view_form.Tested
All 7 modules install successfully on Odoo 19 CE and basic functionality
works (directory creation, file upload, kanban view, embedded DMS on
partners and employees, auto-classification wizard, HTML editor media
dialog).
🤖 Generated with Claude Code